function handleConfig (data, name) {
  if (!name.includes('.')) {
    // console.log(typeof name, name)
    return data[name]
  }
  const arr = name.split('.')
  const k1 = arr.shift()
  const k2 = arr.join('.')
  if (!data[k1]) {
    return
  }
  return handleConfig(data[k1], k2)
}

function getConfig (name) {
  return handleConfig(Config, name)
}

export {
  getConfig
}
